#ifndef __ENEMY_H
#define __ENEMY_H

/*
	ENEMY.H

	The CEnemy class

	OpenGL Game Programming
	Author: Kevin Hawkins
	Date: 3/30/2001
	Description: The CEnemy class

*/

#include "entity.h"

class CPlayer;
class CObject;


// Added some AI states
// Jason - 15 Nov 2012
enum AIState_t
{
	AI_UNCARING,	// enemy is not scared and does not care
	AI_SCARED,		// enemy is scared and running away
	AI_DEAD,
	AI_AGGRESSIVE,	// Enemy is chasing the player
	AI_ALERT,		// Enemy is watching the player
	AI_ATTACKING,	// Enemy is jumping at/attacking the player
	AI_JUMPBACK,	// Enemy is jumping away from the player after an attack
	AI_MELTING		// Enemy is melting in the sun and will be searching for a cloud
};

class CEnemy : public CEntity
{
private:

protected:
	float distFromPlayer;	// distance this enemy is from player
	float runSpeed;			// speed of enemy when running
	AIState_t aiState;		// state of enemy thought
	bool canChangeAction;	// can we change what we're doing mid-action

	virtual void OnProcessAI() {};

	void OnCollision(CObject *collisionObject);

public:
	CPlayer *player;

	CEnemy();
	~CEnemy();

	void ProcessAI();
	void SetPlayer(CPlayer *p);
};

#endif